From bd3c0147e469e8015edba14293d16bed30c817dc Mon Sep 17 00:00:00 2001 From: "djm@kirby.fc.hp.com" Date: Sun, 10 Jul 2005 08:53:17 -0700 Subject: [PATCH] Fix zeroing of some counters and add a couple more --- xen/arch/ia64/hypercall.c | 7 ++++--- xen/arch/ia64/privop.c | 5 +++++ xen/arch/ia64/xenmisc.c | 3 +++ 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/xen/arch/ia64/hypercall.c b/xen/arch/ia64/hypercall.c index d7288088cf..84b05e850c 100644 --- a/xen/arch/ia64/hypercall.c +++ b/xen/arch/ia64/hypercall.c @@ -34,7 +34,7 @@ ia64_hypercall (struct pt_regs *regs) case FW_HYPERCALL_PAL_CALL: //printf("*** PAL hypercall: index=%d\n",regs->r28); //FIXME: This should call a C routine -#if 1 +#if 0 // This is very conservative, but avoids a possible // (and deadly) freeze in paravirtualized domains due // to a yet-to-be-found bug where pending_interruption @@ -47,8 +47,9 @@ ia64_hypercall (struct pt_regs *regs) #define SPURIOUS_VECTOR 15 pi = vcpu_check_pending_interrupts(v); if (pi != SPURIOUS_VECTOR) { - idle_when_pending++; - pi = vcpu_pend_unspecified_interrupt(v); + if (!v->vcpu_info->arch.pending_interruption) + idle_when_pending++; + vcpu_pend_unspecified_interrupt(v); //printf("idle w/int#%d pending!\n",pi); //this shouldn't happen, but it apparently does quite a bit! so don't //allow it to happen... i.e. if a domain has an interrupt pending and diff --git a/xen/arch/ia64/privop.c b/xen/arch/ia64/privop.c index a48a9edb9b..f648144e4b 100644 --- a/xen/arch/ia64/privop.c +++ b/xen/arch/ia64/privop.c @@ -1040,6 +1040,7 @@ extern unsigned long vhpt_translate_count; extern unsigned long lazy_cover_count; extern unsigned long idle_when_pending; extern unsigned long pal_halt_light_count; +extern unsigned long context_switch_count; int dump_misc_stats(char *buf) { @@ -1050,6 +1051,7 @@ int dump_misc_stats(char *buf) s += sprintf(s,"Physical translations: %d\n",phys_translate_count); s += sprintf(s,"Idle when pending: %d\n",idle_when_pending); s += sprintf(s,"PAL_HALT_LIGHT (no pending): %d\n",pal_halt_light_count); + s += sprintf(s,"context switches: %d\n",context_switch_count); s += sprintf(s,"Lazy covers: %d\n",lazy_cover_count); return s - buf; } @@ -1061,6 +1063,9 @@ void zero_misc_stats(void) phys_translate_count = 0; vhpt_translate_count = 0; lazy_cover_count = 0; + pal_halt_light_count = 0; + idle_when_pending = 0; + context_switch_count = 0; } int dump_hyperprivop_counts(char *buf) diff --git a/xen/arch/ia64/xenmisc.c b/xen/arch/ia64/xenmisc.c index da9c034e96..f734f852dd 100644 --- a/xen/arch/ia64/xenmisc.c +++ b/xen/arch/ia64/xenmisc.c @@ -257,6 +257,8 @@ void *module_text_address(unsigned long addr) { return NULL; } void cs10foo(void) {} void cs01foo(void) {} +unsigned long context_switch_count = 0; + // context_switch void context_switch(struct vcpu *prev, struct vcpu *next) { @@ -276,6 +278,7 @@ void context_switch(struct vcpu *prev, struct vcpu *next) /* Housekeeping for prev domain */ #endif // CONFIG_VTI + context_switch_count++; switch_to(prev,next,prev); #ifdef CONFIG_VTI /* Post-setup for new domain */ -- 2.30.2